
  $(function(){
		$("#updateDefault").click(function(){
			 var id = $('#id').val();
			 var message = $('#message').val();
			 var url = $('#imgurl').val();
			 var defaults = {"id":id, "message":message,"url":url};
			  $.ajax({ 
                  type : "post",                                             
                  url : "default-update",
                  dataType:"json", 
                  contentType:"application/json",
                  data:JSON.stringify(defaults),
                  success : function(data) {   	
				    alert(data.message);
				    var index = parent.layer.getFrameIndex(window.name);
				    window.parent.location.reload();
				    // 关闭当前frame
				    parent.layer.close(index);
                   
                     
                  },
                  error : function() {
                      alert("更新失败");
                  }
              });	
		});
		});